(function (aopc) {
    aopc.addExpandPage(797, function (get) {

        return {
            expandInit() {
                this.adjourn_meeting_dialog = this.getProperty('adjourn_meeting_dialog');
                this.adjourn_type = this.getProperty('adjourn_type');
                this.adjourn_type.selectValue = 1;
            },
            setSelfHide({ property, e }) {
                const ele = property.getElement();
                if (ele === e.target) property.setIsVisible(false);
            },
            setAdjournType({ property }) {
                this.adjourn_type.properties.forEach((p, i) => {
                       if (property === p) {
                        p.style.backgroundColor = '#ffffff';
                        if (this.theme === 'red') {
                            p.style.border = '2rem solid #EA0000';
                            p.properties[0].spanStyle.color = '#EA0000';
                        }
                        else {
                            p.style.border = '2rem solid #5B93DD';
                            p.properties[0].spanStyle.color = '#5B93DD';
                        }
                        p.style.boxShadow = '0px 17rem 29rem 0px rgba(0,120,251,0.0902)';
                        p.properties[1].setIsVisible(true);
                        this.adjourn_type.selectValue = i + 1;
                    }
                    else {
                        p.style.backgroundColor = 'rgba(255,255,255,0.6)';
                        if (this.theme === 'red') {
                            p.style.border = '2rem solid #FFC8C8';
                        }
                        else {
                            p.style.border = '2rem solid #ADD3F2';
                        }
                        p.style.boxShadow = '';
                        p.properties[0].spanStyle.color = '#2a2a2a';
                        p.properties[1].setIsVisible(false);
                    }
                    p.refresh();
                    p.properties[0].refresh();
                });
            },
            startAdjourn() {
                const AdjournType = this.adjourn_type.selectValue;
                const msg = AdjournType === 1 ? '全体体会' : '全体解除休会';
                this.webSocket.send('adjournMeeting', { AdjournType, MeetingId: this.pageData.MeetingId });
                this.alertSuccess(msg + '已发出！', () => {
                    this.adjourn_meeting_dialog.setIsVisible(false);
                })
            }
        }
    });
})(window.aopc);